/**
 * 2018.10.27  xiao    首页
 */
var _Protocol = document.location.origin
var globalConfig = {
  httpPath: _Protocol + '/',
  statichttpPath: _Protocol + '/pages',
  cdnFiletime: '?v=2016120603',
  timeout: '12000', // Ajax 请求超时时限
  rspExTime: '90' // 验证码倒计
}

//ajax请求
function ajaxComm (commData, callback) {
  var api = globalConfig.httpPath + commData.reqUrl
  $.ajax({
    url: api,
    data: commData.reqData,
    dataType: 'json',
    type: commData.reqType,
    timeout: globalConfig.timeout,
    global: true
  }).done(function (ajaxData, status, xhr) {
    if (ajaxData.error_code == '10000') {
      callback(ajaxData)
      return false
    }
    if (ajaxData.error_code == '10007') {
      callback(ajaxData)
      return false
    } else {

    }
  }).fail(function (XMLHttpRequest, textStatus, errorThrown) {

  })
}